// components/copyText/copyText.js
Component({
  /**
   * 组件的属性列表
   */
  options:{
    // styleIsolation : 'apply-shared',
    // multipleSlots:true,
    // addGlobalClass: true
  },
  properties: {
    copyText : String,
    TeamcopyText : String
  },
  externalClasses: ['Button-class11'],
  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleCopyText(){
      var a=''
      if (this.data.copyText != '') { 
        a = this.data.copyText,
        this.data.copyText=''
      }
      else if (this.data.TeamcopyText!=''){
        a = this.data.TeamcopyText,
          this.data.TeamcopyText=''
      }
      wx.setClipboardData({
        data: a,
        success(res){
          wx.getClipboardData({
            success(res){
              wx.showToast({
                title: '复制成功'
              })
            }
          })
        }
      })
    }
  }
})
